@import '../variables/default.scss';
@import '../mixins/index.scss';

$component: '.at-checkbox';

#{$component} {
  display: inline-flex;

  &__title {
    display: inline-flex;
    color: $at-checkbox-title-color;
    font-size: $at-checkbox-title-font-size;
    line-height: $line-height-zh;
    text-align: left;
  }

  &__image-cnt {
    border: none !important;
  }

  &__icon-cnt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    margin-right: $spacing-h-lg;
    width: $at-checkbox-circle-size;
    min-width: $at-checkbox-circle-size;
    height: $at-checkbox-circle-size;
    color: transparent;
    font-size: $at-checkbox-icon-size;
    line-height: 1;
    border: 2px solid rgba($color: $at-checkbox-icon-color, $alpha: 0.2);
    border-radius: $border-radius-circle;
    background-color: $color-bg;
    box-sizing: border-box;
    transition: all 0.2s;

    .at-checkbox-image {
      width: $at-checkbox-circle-size;
      height: $at-checkbox-circle-size;
    }
  }

  &--disabled {
    opacity: $opacity-disabled;
  }

  &--selected {
    #{$component}__icon-cnt {
      color: $at-checkbox-icon-color-checked;
      border: none;
      background-color: $at-checkbox-icon-color;
    }
  }
}
